package com.hhw.entity;

import java.util.List;

public class OrderPage<T> {
	private List<T> orderlist;  //订单集合列表
	private int orderpageNum; //当前页
	private int orderpageSize; //每页显示几条数据
	private int orderprePageNum; //上一页
	private int ordernextPageNum; //下一页
	private int ordertotalPageNum; //总页数
	private int ordertotalCount; //数据总数
	
	public int getOrdernextPageNum() {
		return ordernextPageNum;
	}
	public void setOrdernextPageNum(int ordernextPageNum) {
		this.ordernextPageNum = ordernextPageNum;
	}
	public List<T> getOrderlist() {
		return orderlist;
	}
	public void setOrderlist(List<T> orderlist) {
		this.orderlist = orderlist;
	}
	public int getOrderpageNum() {
		return orderpageNum;
	}
	public void setOrderpageNum(int orderpageNum) {
		this.orderpageNum = orderpageNum;
	}
	public int getOrderpageSize() {
		return orderpageSize;
	}
	public void setOrderpageSize(int orderpageSize) {
		this.orderpageSize = orderpageSize;
	}
	public int getOrderprePageNum() {
		return orderprePageNum;
	}
	public void setOrderprePageNum(int orderprePageNum) {
		this.orderprePageNum = orderprePageNum;
	}
	public int getOrderextPageNum() {
		return ordernextPageNum;
	}
	public void setOrderextPageNum(int orderextPageNum) {
		this.ordernextPageNum = orderextPageNum;
	}
	public int getOrdertotalPageNum() {
		return ordertotalPageNum;
	}
	public void setOrdertotalPageNum(int ordertotalPageNum) {
		this.ordertotalPageNum = ordertotalPageNum;
	}
	public int getOrdertotalCount() {
		return ordertotalCount;
	}
	public void setOrdertotalCount(int ordertotalCount) {
		this.ordertotalCount = ordertotalCount;
		if(ordertotalCount%orderpageSize==0){
			ordertotalPageNum=ordertotalCount/orderpageSize;
		}else{
			ordertotalPageNum=ordertotalCount/orderpageSize+1;
		}
		if(orderpageNum>1){
			orderprePageNum=orderpageNum-1;
		}else{
			orderprePageNum=1;
		}
		if(orderpageNum<ordertotalPageNum){
			ordernextPageNum=orderpageNum+1;
		}else{
			ordernextPageNum=ordertotalPageNum;
		}
	}
	


	public OrderPage() {
		
	}
	
	public OrderPage(int orderpageNum, int orderpageSize) {
		super();
		this.orderpageNum = orderpageNum;
		this.orderpageSize = orderpageSize;
	}
	
	

}
